
    <!DOCTYPE html>
    <html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
        <meta name="description" content="">
        <meta name="author" content="hzcmgd">
        <title>树人学习</title>
        <link rel="icon" href="favicon.ico">

        <!-- Bootstrap core CSS -->
        <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

        <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
        <link href="http://v3.bootcss.com/assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet">
        <!-- Custom styles for this template -->
        <link href="/static/pc/reg.css" rel="stylesheet">

        <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
        <!--[if lt IE 9]><script src="http://v3.bootcss.com/assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
        <script src="http://v3.bootcss.com/assets/js/ie-emulation-modes-warning.js"></script>

        <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
        <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
        <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->

        <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
        <script src="/static/admin/js/layer/layer.js"></script>
        <script src="/static/admin/js/laypage/laypage.js"></script>
        <script src="/static/admin/js/laytpl/laytpl.js"></script>
        <link href="/static/admin/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    </head>

<body>
{include file="public/header2" /}

<div class="container container-form"  style="width: 900px; padding: 0 200px;">

    <div class="page-header">
        <h2>个人注册</h2>
    </div>




        {if condition="$role==1||$role==2"}
        <div class="col-sm-12"  >
            <p class="p4">学籍号：{$info.studentCode}</p>
            <p class="p4">学生姓名：{$info.studentName}</p>
            <p class="p4">联系电话：{$info.mobile}</p>
            <p class="p4">性别：  {if condition="$info.sex eq 0"}男{else}女{/if} </p>
            <p class="p4">学校：{$instit_name}</p>
            <p class="p4">入学年份：{$info.jionyear}</p>
        </div>
        {/if}

        {if condition="$role eq 3"}
        <div class="col-sm-12"  >
            <p class="p4">学生姓名：{$info.name}</p>
            <p class="p4">联系电话：{$info.mobile}</p>
            <p class="p4">性别：  {if condition="$info.sex eq 0"}男{else}女{/if} </p>
            <p class="p4">学校：{$instit_name}</p>
        </div>
        {/if}

        {if condition="$role eq 4"}
        <div class="col-sm-12"  >
            <p class="p4">姓名:{$user.nickname}</p>
            <p class="p4">电话:{$user.account}</p>
            <!--<p class="p4">性别：  {if condition="$info.sex eq 0"}男{else}女{/if} </p>-->
            <p class="p4">所属机构:{$instit_name}</p>
        </div>
        {/if}
    <form class="form-horizontal"   name="add" id="add" method="post" action="{:url('user/save_pwd')}"  >
        <div class="form-group">
            <label for="username" class="col-sm-2 control-label" id="xjh" style="padding-right: 0px;">登录密码:</label>
            <div class="col-sm-10">
                <input class="form-control" type="password" name="password" id="password" value="">
            </div>
        </div>



        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <input class="text" type="hidden" name="user_id" id="user_id" value="{$user.id}">
                <a href="javascript:;" onclick="save_pwd();return false;">   <button type="submit" class="btn btn-default btn-cmgd">提交</button>  </a>
            </div>
        </div>
    </form>


</div><!--/.container-->



<script type="text/javascript">


    function save_pwd(){

        var password =  document.getElementById('password').value;
        var user_id =  document.getElementById('user_id').value;

        if( '' == password){
            layer.msg('请填写密码', {icon: 5}, function(index){
                layer.close(index);
            });
            return false;
        }


        $.post('{:url("user/save_pwd2")}',
                {password:password,user_id:user_id},
                function(data){
                    if(data.code==1){
                        layer.msg(data.msg,{icon:1,time:2000,shade: 0.1,});
                        location.href ="/web/user/login.html";
                    }else{
                        layer.msg(data.msg,{icon:5,time:1500,shade: 0.1,});
                        return false;
                    }
                });
        return false;
    }
</script>

</body>
    </html>

